/*
 * SEGUNDA ENTREGA DEL PROYECTO DE BASES DE DATOS "BIBLIOTECA DIGITAL"
 * 
 * Integrantes:
 * Gamboa Edwin Ricardo Cód: 0926631 plan: 2711
 * Portilla Cortes Maria Cristina Cód: 0844113 plan: 3743 
 * Rosero Rosero Luis Alberto Cód: 0943740 plan:3743
 * 
 */
/*
 * GUIModificarUsuario.java
 *
 * Created on 5/05/2011, 05:16:32 PM
 */

package gui;

import controlador.ControladorUsuario;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
import javax.swing.JOptionPane;
import java.awt.*;

/**
 *
 * @author mariacpc
 */


public class GUIModificarUsuario1 extends javax.swing.JFrame {
    private ControladorUsuario controlador=new ControladorUsuario();
    private String genero,tipoDeUsuario,vinvuloUV,dia,mes,ano,nivelDeEscolaridad;
    Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();

    /** Creates new form GUIModificarUsuario */
    public GUIModificarUsuario1() {
        initComponents();
        setLocation((screenSize.width-494)/2,(screenSize.height-272)/2);
        setVisible(true); 
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        buttonGroup1 = new javax.swing.ButtonGroup();
        buttonGroup2 = new javax.swing.ButtonGroup();
        jPanel3 = new javax.swing.JPanel();
        jPanel4 = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        CampoCodigo = new javax.swing.JTextField();
        ActivarUsuarioDeNuevo = new javax.swing.JCheckBox();
        jPanel1 = new javax.swing.JPanel();
        CheckBoxnombre = new javax.swing.JCheckBox();
        CheckBoxapellidos = new javax.swing.JCheckBox();
        CampoNombreNuevo = new javax.swing.JTextField();
        CampoApellidos = new javax.swing.JTextField();
        CheckBoxgenero = new javax.swing.JCheckBox();
        CheckBoxfechaDeNacimiento = new javax.swing.JCheckBox();
        CheckBoxcorreoElectronico = new javax.swing.JCheckBox();
        jComboBoxGenero = new javax.swing.JComboBox();
        ComboBoxDiaNacimiento = new javax.swing.JComboBox();
        ComoboBoxMesNacimiento = new javax.swing.JComboBox();
        ComboBoxAnoNacimiento = new javax.swing.JComboBox();
        ComboBoxEscolaridad = new javax.swing.JComboBox();
        CheckBoxnivelEscolaridad = new javax.swing.JCheckBox();
        CampoCorreoElectronico = new javax.swing.JTextField();
        jPanel2 = new javax.swing.JPanel();
        CheckBoxVinculoUV = new javax.swing.JCheckBox();
        comoboboxVinculoUV = new javax.swing.JComboBox();
        CheckBoxLogin = new javax.swing.JCheckBox();
        CampoLogin = new javax.swing.JTextField();
        CheckBoxContrasena = new javax.swing.JCheckBox();
        CampoContrasena = new javax.swing.JPasswordField();
        CheckBoxPreguntaSecreta = new javax.swing.JCheckBox();
        CheckBoxRespuestaSecreta = new javax.swing.JCheckBox();
        CampoRespuestaSecreta = new javax.swing.JTextField();
        CheckBoxTipoDeUsuario = new javax.swing.JCheckBox();
        comboboxt_user = new javax.swing.JComboBox();
        ComboBoxPSecreta = new javax.swing.JComboBox();
        jButton1 = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setTitle("Modificacion de Usuario");
        setResizable(false);

        jPanel3.setBackground(new java.awt.Color(255, 255, 255));

        jPanel4.setBackground(new java.awt.Color(255, 255, 255));
        jPanel4.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Desactivar usuario", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Verdana", 1, 14), new java.awt.Color(255, 0, 0))); // NOI18N

        jLabel1.setBackground(new java.awt.Color(255, 255, 255));
        jLabel1.setFont(new java.awt.Font("Verdana", 1, 12)); // NOI18N
        jLabel1.setForeground(new java.awt.Color(153, 153, 153));
        jLabel1.setText("Codigo de Usuario: ");

        ActivarUsuarioDeNuevo.setBackground(new java.awt.Color(255, 255, 255));
        ActivarUsuarioDeNuevo.setFont(new java.awt.Font("Verdana", 1, 12)); // NOI18N
        ActivarUsuarioDeNuevo.setForeground(new java.awt.Color(153, 153, 153));
        ActivarUsuarioDeNuevo.setText("Activar de nuevo");
        ActivarUsuarioDeNuevo.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                ActivarUsuarioDeNuevoActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
        jPanel4.setLayout(jPanel4Layout);
        jPanel4Layout.setHorizontalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 161, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(CampoCodigo, javax.swing.GroupLayout.PREFERRED_SIZE, 198, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(ActivarUsuarioDeNuevo, javax.swing.GroupLayout.PREFERRED_SIZE, 222, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(15, 15, 15))
        );
        jPanel4Layout.setVerticalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel1)
                    .addComponent(CampoCodigo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(ActivarUsuarioDeNuevo))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jPanel1.setBackground(new java.awt.Color(255, 255, 255));
        jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Datos personales", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Verdana", 1, 14), new java.awt.Color(255, 0, 0))); // NOI18N

        CheckBoxnombre.setBackground(new java.awt.Color(255, 255, 255));
        CheckBoxnombre.setFont(new java.awt.Font("Verdana", 1, 12)); // NOI18N
        CheckBoxnombre.setForeground(new java.awt.Color(153, 153, 153));
        CheckBoxnombre.setText("nombre");
        CheckBoxnombre.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                CheckBoxnombreItemStateChanged(evt);
            }
        });
        CheckBoxnombre.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                CheckBoxnombreActionPerformed(evt);
            }
        });

        CheckBoxapellidos.setBackground(new java.awt.Color(255, 255, 255));
        CheckBoxapellidos.setFont(new java.awt.Font("Verdana", 1, 12)); // NOI18N
        CheckBoxapellidos.setForeground(new java.awt.Color(153, 153, 153));
        CheckBoxapellidos.setText("apellidos");
        CheckBoxapellidos.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                CheckBoxapellidosItemStateChanged(evt);
            }
        });
        CheckBoxapellidos.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                CheckBoxapellidosActionPerformed(evt);
            }
        });

        CampoNombreNuevo.setFont(new java.awt.Font("Verdana", 0, 12)); // NOI18N
        CampoNombreNuevo.setEnabled(false);
        CampoNombreNuevo.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                CampoNombreNuevoActionPerformed(evt);
            }
        });

        CampoApellidos.setFont(new java.awt.Font("Verdana", 0, 12)); // NOI18N
        CampoApellidos.setEnabled(false);

        CheckBoxgenero.setBackground(new java.awt.Color(255, 255, 255));
        CheckBoxgenero.setFont(new java.awt.Font("Verdana", 1, 12)); // NOI18N
        CheckBoxgenero.setForeground(new java.awt.Color(153, 153, 153));
        CheckBoxgenero.setText("genero");
        CheckBoxgenero.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                CheckBoxgeneroItemStateChanged(evt);
            }
        });

        CheckBoxfechaDeNacimiento.setBackground(new java.awt.Color(255, 255, 255));
        CheckBoxfechaDeNacimiento.setFont(new java.awt.Font("Verdana", 1, 12)); // NOI18N
        CheckBoxfechaDeNacimiento.setForeground(new java.awt.Color(153, 153, 153));
        CheckBoxfechaDeNacimiento.setText("fecha de nacimiento");
        CheckBoxfechaDeNacimiento.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                CheckBoxfechaDeNacimientoItemStateChanged(evt);
            }
        });

        CheckBoxcorreoElectronico.setBackground(new java.awt.Color(255, 255, 255));
        CheckBoxcorreoElectronico.setFont(new java.awt.Font("Verdana", 1, 12)); // NOI18N
        CheckBoxcorreoElectronico.setForeground(new java.awt.Color(153, 153, 153));
        CheckBoxcorreoElectronico.setText("correo electronico");
        CheckBoxcorreoElectronico.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                CheckBoxcorreoElectronicoItemStateChanged(evt);
            }
        });
        CheckBoxcorreoElectronico.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                CheckBoxcorreoElectronicoActionPerformed(evt);
            }
        });

        jComboBoxGenero.setFont(new java.awt.Font("Verdana", 0, 12)); // NOI18N
        jComboBoxGenero.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Ninguno:", "femenino", "masculino" }));
        jComboBoxGenero.setEnabled(false);
        jComboBoxGenero.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                jComboBoxGeneroItemStateChanged(evt);
            }
        });

        ComboBoxDiaNacimiento.setFont(new java.awt.Font("Verdana", 0, 12)); // NOI18N
        ComboBoxDiaNacimiento.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Dia:", "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31" }));
        ComboBoxDiaNacimiento.setEnabled(false);
        ComboBoxDiaNacimiento.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                ComboBoxDiaNacimientoItemStateChanged(evt);
            }
        });

        ComoboBoxMesNacimiento.setFont(new java.awt.Font("Verdana", 0, 12)); // NOI18N
        ComoboBoxMesNacimiento.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Mes:", "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12" }));
        ComoboBoxMesNacimiento.setEnabled(false);
        ComoboBoxMesNacimiento.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                ComoboBoxMesNacimientoItemStateChanged(evt);
            }
        });
        ComoboBoxMesNacimiento.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                ComoboBoxMesNacimientoActionPerformed(evt);
            }
        });

        ComboBoxAnoNacimiento.setFont(new java.awt.Font("Verdana", 0, 12)); // NOI18N
        ComboBoxAnoNacimiento.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Anio:", "1980", "1981", "1982", "1983", "1984", "1985", "1986", "1986", "1987", "1988", "1989", "1990", "1991", "1992", "1993", "1994", "1995", "1996", "1997", "1998" }));
        ComboBoxAnoNacimiento.setEnabled(false);
        ComboBoxAnoNacimiento.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                ComboBoxAnoNacimientoItemStateChanged(evt);
            }
        });
        ComboBoxAnoNacimiento.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                ComboBoxAnoNacimientoActionPerformed(evt);
            }
        });

        ComboBoxEscolaridad.setFont(new java.awt.Font("Verdana", 0, 12)); // NOI18N
        ComboBoxEscolaridad.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Ninguno:", "preescolar", "basica primaria", "secundaria", "universitario" }));
        ComboBoxEscolaridad.setEnabled(false);
        ComboBoxEscolaridad.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                ComboBoxEscolaridadItemStateChanged(evt);
            }
        });
        ComboBoxEscolaridad.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                ComboBoxEscolaridadActionPerformed(evt);
            }
        });

        CheckBoxnivelEscolaridad.setBackground(new java.awt.Color(255, 255, 255));
        CheckBoxnivelEscolaridad.setFont(new java.awt.Font("Verdana", 1, 12)); // NOI18N
        CheckBoxnivelEscolaridad.setForeground(new java.awt.Color(153, 153, 153));
        CheckBoxnivelEscolaridad.setText("nivel de escolaridad");
        CheckBoxnivelEscolaridad.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                CheckBoxnivelEscolaridadItemStateChanged(evt);
            }
        });
        CheckBoxnivelEscolaridad.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                CheckBoxnivelEscolaridadActionPerformed(evt);
            }
        });

        CampoCorreoElectronico.setEnabled(false);
        CampoCorreoElectronico.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                CampoCorreoElectronicoActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(CheckBoxnombre, javax.swing.GroupLayout.DEFAULT_SIZE, 85, Short.MAX_VALUE)
                            .addComponent(CheckBoxgenero, javax.swing.GroupLayout.DEFAULT_SIZE, 85, Short.MAX_VALUE)
                            .addComponent(CheckBoxapellidos))
                        .addGap(2, 2, 2)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(CampoApellidos, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 515, Short.MAX_VALUE)
                            .addComponent(CampoNombreNuevo, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 515, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                    .addComponent(ComboBoxDiaNacimiento, javax.swing.GroupLayout.PREFERRED_SIZE, 96, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(jComboBoxGenero, 0, 194, Short.MAX_VALUE))
                                .addGap(18, 18, 18)
                                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(CampoCorreoElectronico, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 303, Short.MAX_VALUE)
                                    .addGroup(jPanel1Layout.createSequentialGroup()
                                        .addComponent(ComoboBoxMesNacimiento, javax.swing.GroupLayout.PREFERRED_SIZE, 103, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 66, Short.MAX_VALUE)
                                        .addComponent(ComboBoxAnoNacimiento, javax.swing.GroupLayout.PREFERRED_SIZE, 134, javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                                        .addComponent(CheckBoxnivelEscolaridad, javax.swing.GroupLayout.PREFERRED_SIZE, 168, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(ComboBoxEscolaridad, javax.swing.GroupLayout.PREFERRED_SIZE, 133, javax.swing.GroupLayout.PREFERRED_SIZE)))))
                        .addGap(821, 821, 821))
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                        .addComponent(CheckBoxcorreoElectronico, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(CheckBoxfechaDeNacimiento, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 172, Short.MAX_VALUE)))
                .addContainerGap())
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(CampoNombreNuevo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(CheckBoxnombre))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(CampoApellidos, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(CheckBoxapellidos))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(CheckBoxnivelEscolaridad)
                    .addComponent(ComboBoxEscolaridad, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(CheckBoxgenero)
                    .addComponent(jComboBoxGenero, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(CheckBoxfechaDeNacimiento)
                    .addComponent(ComboBoxAnoNacimiento, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(ComboBoxDiaNacimiento, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(ComoboBoxMesNacimiento, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(CheckBoxcorreoElectronico)
                    .addComponent(CampoCorreoElectronico, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
        );

        jPanel2.setBackground(new java.awt.Color(255, 255, 255));
        jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Datos Usuario", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Verdana", 1, 14), new java.awt.Color(255, 0, 0))); // NOI18N

        CheckBoxVinculoUV.setBackground(new java.awt.Color(255, 255, 255));
        CheckBoxVinculoUV.setFont(new java.awt.Font("Verdana", 1, 12)); // NOI18N
        CheckBoxVinculoUV.setForeground(new java.awt.Color(153, 153, 153));
        CheckBoxVinculoUV.setText("vinculo UV");
        CheckBoxVinculoUV.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                CheckBoxVinculoUVItemStateChanged(evt);
            }
        });

        comoboboxVinculoUV.setFont(new java.awt.Font("Verdana", 0, 12)); // NOI18N
        comoboboxVinculoUV.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Ninguno:", "Estudiante", "Profesor", "Trabajador", "Pensionado", " ", " " }));
        comoboboxVinculoUV.setEnabled(false);
        comoboboxVinculoUV.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                comoboboxVinculoUVItemStateChanged(evt);
            }
        });

        CheckBoxLogin.setBackground(new java.awt.Color(255, 255, 255));
        CheckBoxLogin.setFont(new java.awt.Font("Verdana", 1, 12)); // NOI18N
        CheckBoxLogin.setForeground(new java.awt.Color(153, 153, 153));
        CheckBoxLogin.setText("login");
        CheckBoxLogin.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                CheckBoxLoginItemStateChanged(evt);
            }
        });
        CheckBoxLogin.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                CheckBoxLoginActionPerformed(evt);
            }
        });

        CampoLogin.setFont(new java.awt.Font("Verdana", 0, 12)); // NOI18N
        CampoLogin.setEnabled(false);

        CheckBoxContrasena.setBackground(new java.awt.Color(255, 255, 255));
        CheckBoxContrasena.setFont(new java.awt.Font("Verdana", 1, 12)); // NOI18N
        CheckBoxContrasena.setForeground(new java.awt.Color(153, 153, 153));
        CheckBoxContrasena.setText("contrasena");
        CheckBoxContrasena.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                CheckBoxContrasenaItemStateChanged(evt);
            }
        });
        CheckBoxContrasena.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                CheckBoxContrasenaActionPerformed(evt);
            }
        });

        CampoContrasena.setFont(new java.awt.Font("Verdana", 0, 12)); // NOI18N
        CampoContrasena.setEnabled(false);

        CheckBoxPreguntaSecreta.setBackground(new java.awt.Color(255, 255, 255));
        CheckBoxPreguntaSecreta.setFont(new java.awt.Font("Verdana", 1, 12)); // NOI18N
        CheckBoxPreguntaSecreta.setForeground(new java.awt.Color(153, 153, 153));
        CheckBoxPreguntaSecreta.setText("pregunta secreta: ");
        CheckBoxPreguntaSecreta.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                CheckBoxPreguntaSecretaItemStateChanged(evt);
            }
        });

        CheckBoxRespuestaSecreta.setBackground(new java.awt.Color(255, 255, 255));
        CheckBoxRespuestaSecreta.setFont(new java.awt.Font("Verdana", 1, 12)); // NOI18N
        CheckBoxRespuestaSecreta.setForeground(new java.awt.Color(153, 153, 153));
        CheckBoxRespuestaSecreta.setText("respuesta secreta: ");
        CheckBoxRespuestaSecreta.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                CheckBoxRespuestaSecretaItemStateChanged(evt);
            }
        });

        CampoRespuestaSecreta.setFont(new java.awt.Font("Verdana", 0, 12)); // NOI18N
        CampoRespuestaSecreta.setEnabled(false);

        CheckBoxTipoDeUsuario.setBackground(new java.awt.Color(255, 255, 255));
        CheckBoxTipoDeUsuario.setFont(new java.awt.Font("Verdana", 1, 12)); // NOI18N
        CheckBoxTipoDeUsuario.setForeground(new java.awt.Color(153, 153, 153));
        CheckBoxTipoDeUsuario.setText("tipo de usuario");
        CheckBoxTipoDeUsuario.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                CheckBoxTipoDeUsuarioItemStateChanged(evt);
            }
        });

        comboboxt_user.setFont(new java.awt.Font("Verdana", 0, 12)); // NOI18N
        comboboxt_user.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Ninguno:", "Adminitrador", "Catalogador", "Usuario Registrado" }));
        comboboxt_user.setEnabled(false);
        comboboxt_user.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                comboboxt_userItemStateChanged(evt);
            }
        });
        comboboxt_user.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                comboboxt_userActionPerformed(evt);
            }
        });

        ComboBoxPSecreta.setFont(new java.awt.Font("Verdana", 0, 12)); // NOI18N
        ComboBoxPSecreta.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "cual es el nombre de tu primera mascota?", "cual es el nombre de el profesor que mas te gusta?", "cual es el primer nombre de tu mejor amigo?" }));
        ComboBoxPSecreta.setEnabled(false);
        ComboBoxPSecreta.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                ComboBoxPSecretaActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                        .addComponent(CheckBoxRespuestaSecreta, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(CheckBoxPreguntaSecreta, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(CheckBoxVinculoUV, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addComponent(CheckBoxLogin, javax.swing.GroupLayout.DEFAULT_SIZE, 153, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                        .addGroup(jPanel2Layout.createSequentialGroup()
                            .addComponent(comoboboxVinculoUV, javax.swing.GroupLayout.PREFERRED_SIZE, 142, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                            .addComponent(CheckBoxTipoDeUsuario, javax.swing.GroupLayout.PREFERRED_SIZE, 136, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(comboboxt_user, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                        .addComponent(CampoRespuestaSecreta)
                        .addGroup(jPanel2Layout.createSequentialGroup()
                            .addComponent(CampoLogin, javax.swing.GroupLayout.PREFERRED_SIZE, 144, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                            .addComponent(CheckBoxContrasena, javax.swing.GroupLayout.PREFERRED_SIZE, 111, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                            .addComponent(CampoContrasena, javax.swing.GroupLayout.PREFERRED_SIZE, 180, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addComponent(ComboBoxPSecreta, 0, 447, Short.MAX_VALUE))
                .addContainerGap())
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()
                .addContainerGap(11, Short.MAX_VALUE)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(CampoLogin, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(CheckBoxContrasena)
                    .addComponent(CampoContrasena, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(CheckBoxLogin))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(CheckBoxPreguntaSecreta)
                    .addComponent(ComboBoxPSecreta, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(2, 2, 2)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(CheckBoxRespuestaSecreta)
                    .addComponent(CampoRespuestaSecreta, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(CheckBoxVinculoUV)
                    .addComponent(comoboboxVinculoUV, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(CheckBoxTipoDeUsuario)
                    .addComponent(comboboxt_user, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(2, 2, 2))
        );

        jButton1.setFont(new java.awt.Font("Verdana", 1, 12)); // NOI18N
        jButton1.setForeground(new java.awt.Color(255, 0, 0));
        jButton1.setText("Hacer modificacion");
        jButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton1ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
        jPanel3.setLayout(jPanel3Layout);
        jPanel3Layout.setHorizontalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                        .addComponent(jPanel4, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 628, Short.MAX_VALUE)
                        .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel3Layout.createSequentialGroup()
                            .addContainerGap()
                            .addComponent(jButton1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                        .addComponent(jPanel1, javax.swing.GroupLayout.Alignment.LEADING, 0, 628, Short.MAX_VALUE))
                    .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
        );
        jPanel3Layout.setVerticalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(1, 1, 1)
                .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, 156, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jButton1)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void CheckBoxnombreActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_CheckBoxnombreActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_CheckBoxnombreActionPerformed

    private void CheckBoxapellidosActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_CheckBoxapellidosActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_CheckBoxapellidosActionPerformed

    private void ComboBoxDiaNacimientoItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_ComboBoxDiaNacimientoItemStateChanged
          if(evt.getStateChange()==ItemEvent.SELECTED){
                dia=Integer.toString(ComboBoxDiaNacimiento.getSelectedIndex());
          }
    }//GEN-LAST:event_ComboBoxDiaNacimientoItemStateChanged

    private void ComoboBoxMesNacimientoItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_ComoboBoxMesNacimientoItemStateChanged
         if(evt.getStateChange()==ItemEvent.SELECTED)
            mes=Integer.toString(ComoboBoxMesNacimiento.getSelectedIndex());
}//GEN-LAST:event_ComoboBoxMesNacimientoItemStateChanged

    private void ComoboBoxMesNacimientoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_ComoboBoxMesNacimientoActionPerformed
        // TODO add your handling code here:
}//GEN-LAST:event_ComoboBoxMesNacimientoActionPerformed

    private void ComboBoxAnoNacimientoItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_ComboBoxAnoNacimientoItemStateChanged
        if(evt.getStateChange()==ItemEvent.SELECTED)
            ano=Integer.toString(ComboBoxAnoNacimiento.getSelectedIndex());
}//GEN-LAST:event_ComboBoxAnoNacimientoItemStateChanged

    private void ComboBoxAnoNacimientoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_ComboBoxAnoNacimientoActionPerformed


    }//GEN-LAST:event_ComboBoxAnoNacimientoActionPerformed

    private void ComboBoxEscolaridadItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_ComboBoxEscolaridadItemStateChanged
       String[] niveles={"ninguno","preescolar","basica primaria","secundaria","universitario"};
        if(evt.getStateChange()==ItemEvent.SELECTED){
            nivelDeEscolaridad=niveles[ComboBoxEscolaridad.getSelectedIndex()];
        }
}//GEN-LAST:event_ComboBoxEscolaridadItemStateChanged

    private void ComboBoxEscolaridadActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_ComboBoxEscolaridadActionPerformed


    }//GEN-LAST:event_ComboBoxEscolaridadActionPerformed

    private void CheckBoxnivelEscolaridadActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_CheckBoxnivelEscolaridadActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_CheckBoxnivelEscolaridadActionPerformed

    private void CampoCorreoElectronicoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_CampoCorreoElectronicoActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_CampoCorreoElectronicoActionPerformed

    private void comoboboxVinculoUVItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_comoboboxVinculoUVItemStateChanged
       String vinculo[]={" ","Estudiante","Profesor","Trabajador","Pensionado"};
        if(evt.getStateChange()==ItemEvent.SELECTED){
            vinvuloUV=vinculo[comoboboxVinculoUV.getSelectedIndex()];
        }
}//GEN-LAST:event_comoboboxVinculoUVItemStateChanged

        private void CheckBoxLoginActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_CheckBoxLoginActionPerformed
            // TODO add your handling code here:
        }//GEN-LAST:event_CheckBoxLoginActionPerformed

        private void CheckBoxContrasenaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_CheckBoxContrasenaActionPerformed
            // TODO add your handling code here:
        }//GEN-LAST:event_CheckBoxContrasenaActionPerformed

        private void comboboxt_userItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_comboboxt_userItemStateChanged
            if(evt.getStateChange()==ItemEvent.SELECTED){
                tipoDeUsuario=Integer.toString(comboboxt_user.getSelectedIndex());

            }
        }//GEN-LAST:event_comboboxt_userItemStateChanged

        private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
        if(!controlador.existeCodigo(CampoCodigo.getText())){
             JOptionPane.showMessageDialog(this, "El codigo de usuario ingresado no existe"
                     + "por lo tanto no se hizo ninguna modificaion.", "Error de registro",
                    JOptionPane.ERROR_MESSAGE);
        }

             if(CheckBoxnombre.isSelected()){
               controlador.modificarUsuario(1,CampoCodigo.getText(),CampoNombreNuevo.getText());
             }
             if(CheckBoxapellidos.isSelected()){
                 controlador.modificarUsuario(2,CampoCodigo.getText(),CampoApellidos.getText());
             }
            if(CheckBoxgenero.isSelected()){
                 controlador.modificarUsuario(3,CampoCodigo.getText(),genero);
            }
            if(CheckBoxfechaDeNacimiento.isSelected()){
                controlador.modificarUsuario(4,CampoCodigo.getText(),ano+"-"+mes+"-"+dia);
            }
            if(CheckBoxnivelEscolaridad.isSelected()){
                controlador.modificarUsuario(5,CampoCodigo.getText(),nivelDeEscolaridad);
            }
            if(CheckBoxVinculoUV.isSelected()){
                controlador.modificarUsuario(6,CampoCodigo.getText(),vinvuloUV);
            }
            if(CheckBoxContrasena.isSelected()){

                 controlador.modificarUsuario(7,CampoCodigo.getText(),new String(CampoContrasena.getPassword()));
            }
             if(CheckBoxPreguntaSecreta.isSelected()){
                 controlador.modificarUsuario(8,CampoCodigo.getText(),ComboBoxPSecreta.getSelectedItem().toString());
            }
            if(CheckBoxRespuestaSecreta.isSelected()){
                controlador.modificarUsuario(9,CampoCodigo.getText(),CampoRespuestaSecreta.getText());

            }
            if(CheckBoxLogin.isSelected()){
                controlador.modificarUsuario(10,CampoCodigo.getText(),CampoLogin.getText());
            }
            if(CheckBoxTipoDeUsuario.isSelected()){
                controlador.modificarUsuario(11,CampoCodigo.getText(),tipoDeUsuario);

            }
            if(CheckBoxcorreoElectronico.isSelected()){
                controlador.modificarUsuario(12,CampoCodigo.getText(),CampoCorreoElectronico.getText());
            }
            if(ActivarUsuarioDeNuevo.isSelected()){
                controlador.modificarUsuario(13,CampoCodigo.getText(),"Activado");
            }                
            JOptionPane.showMessageDialog(null,"usuario "+CampoCodigo.getText()+" modificado");
             
        }//GEN-LAST:event_jButton1ActionPerformed

        private void jComboBoxGeneroItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_jComboBoxGeneroItemStateChanged
              String[] index={"","f","m"};
            if(evt.getStateChange()==ItemEvent.SELECTED){
            genero=index[jComboBoxGenero.getSelectedIndex()];
            }
        }//GEN-LAST:event_jComboBoxGeneroItemStateChanged

        private void ActivarUsuarioDeNuevoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_ActivarUsuarioDeNuevoActionPerformed
            // TODO add your handling code here:
        }//GEN-LAST:event_ActivarUsuarioDeNuevoActionPerformed

        private void comboboxt_userActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_comboboxt_userActionPerformed
            // TODO add your handling code here:
        }//GEN-LAST:event_comboboxt_userActionPerformed

        private void CampoNombreNuevoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_CampoNombreNuevoActionPerformed
            // TODO add your handling code here:
        }//GEN-LAST:event_CampoNombreNuevoActionPerformed

        private void CheckBoxcorreoElectronicoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_CheckBoxcorreoElectronicoActionPerformed
            // TODO add your handling code here:
        }//GEN-LAST:event_CheckBoxcorreoElectronicoActionPerformed

        private void CheckBoxnombreItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_CheckBoxnombreItemStateChanged
            if(CheckBoxnombre.isSelected()){ 
                CampoNombreNuevo.setEnabled(true);
            }else {
                CampoNombreNuevo.setEnabled(false);
            }
            
        }//GEN-LAST:event_CheckBoxnombreItemStateChanged

        private void CheckBoxapellidosItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_CheckBoxapellidosItemStateChanged
            
            if(CheckBoxapellidos.isSelected()){
                CampoApellidos.setEnabled(true);
            }else {
                CampoApellidos.setEnabled(false);
            }
        }//GEN-LAST:event_CheckBoxapellidosItemStateChanged

        private void CheckBoxgeneroItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_CheckBoxgeneroItemStateChanged
            
            if(CheckBoxgenero.isSelected()){
                jComboBoxGenero.setEnabled(true);
            }else {
                jComboBoxGenero.setEnabled(false);
            }
            
        }//GEN-LAST:event_CheckBoxgeneroItemStateChanged

        private void CheckBoxnivelEscolaridadItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_CheckBoxnivelEscolaridadItemStateChanged
            
             if(CheckBoxnivelEscolaridad.isSelected()){
                ComboBoxEscolaridad.setEnabled(true);
            }else {
                ComboBoxEscolaridad.setEnabled(false);
            }
        }//GEN-LAST:event_CheckBoxnivelEscolaridadItemStateChanged

        private void CheckBoxfechaDeNacimientoItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_CheckBoxfechaDeNacimientoItemStateChanged
            
            
            if(CheckBoxfechaDeNacimiento.isSelected()){
                ComboBoxDiaNacimiento.setEnabled(true);
                ComoboBoxMesNacimiento.setEnabled(true);
                ComboBoxAnoNacimiento.setEnabled(true);
            }else {
                ComboBoxDiaNacimiento.setEnabled(false);
                ComoboBoxMesNacimiento.setEnabled(false);
                ComboBoxAnoNacimiento.setEnabled(false);
            }
    
        }//GEN-LAST:event_CheckBoxfechaDeNacimientoItemStateChanged

        private void CheckBoxcorreoElectronicoItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_CheckBoxcorreoElectronicoItemStateChanged
           
           if(CheckBoxcorreoElectronico.isSelected()){
                CampoCorreoElectronico.setEnabled(true);
            }else {
                CampoCorreoElectronico.setEnabled(false);
            }
        }//GEN-LAST:event_CheckBoxcorreoElectronicoItemStateChanged

        private void CheckBoxLoginItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_CheckBoxLoginItemStateChanged
            if(CheckBoxLogin.isSelected()){
                CampoLogin.setEnabled(true);
            }else {
                CampoLogin.setEnabled(false);
            }
        }//GEN-LAST:event_CheckBoxLoginItemStateChanged

        private void CheckBoxContrasenaItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_CheckBoxContrasenaItemStateChanged
            
            if(CheckBoxContrasena.isSelected()){
               CampoContrasena.setEnabled(true);
            }else {
                CampoContrasena.setEnabled(false);
            }
        }//GEN-LAST:event_CheckBoxContrasenaItemStateChanged

        private void CheckBoxPreguntaSecretaItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_CheckBoxPreguntaSecretaItemStateChanged
            
            if(CheckBoxPreguntaSecreta.isSelected()){
               ComboBoxPSecreta.setEnabled(true);
            }else {
                ComboBoxPSecreta.setEnabled(false);
            }
        }//GEN-LAST:event_CheckBoxPreguntaSecretaItemStateChanged

        private void CheckBoxRespuestaSecretaItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_CheckBoxRespuestaSecretaItemStateChanged
           
            if(CheckBoxRespuestaSecreta.isSelected()){
               CampoRespuestaSecreta.setEnabled(true);
            }else {
                CampoRespuestaSecreta.setEnabled(false);
            }
        }//GEN-LAST:event_CheckBoxRespuestaSecretaItemStateChanged

        private void CheckBoxVinculoUVItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_CheckBoxVinculoUVItemStateChanged
            
            if(CheckBoxVinculoUV.isSelected()){
               comoboboxVinculoUV.setEnabled(true);
            }else {
                comoboboxVinculoUV.setEnabled(false);
            }
        }//GEN-LAST:event_CheckBoxVinculoUVItemStateChanged

        private void CheckBoxTipoDeUsuarioItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_CheckBoxTipoDeUsuarioItemStateChanged
            
             if(CheckBoxTipoDeUsuario.isSelected()){
               comboboxt_user.setEnabled(true);
            }else {
                comboboxt_user.setEnabled(false);
            }
        }//GEN-LAST:event_CheckBoxTipoDeUsuarioItemStateChanged

        private void ComboBoxPSecretaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_ComboBoxPSecretaActionPerformed
            // TODO add your handling code here:
}//GEN-LAST:event_ComboBoxPSecretaActionPerformed

    /**
    * @param args the command line arguments
    */
    /*public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new GUIModificarUsuario1();
            }
        });
    }*/

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JCheckBox ActivarUsuarioDeNuevo;
    private javax.swing.JTextField CampoApellidos;
    private javax.swing.JTextField CampoCodigo;
    private javax.swing.JPasswordField CampoContrasena;
    private javax.swing.JTextField CampoCorreoElectronico;
    private javax.swing.JTextField CampoLogin;
    private javax.swing.JTextField CampoNombreNuevo;
    private javax.swing.JTextField CampoRespuestaSecreta;
    private javax.swing.JCheckBox CheckBoxContrasena;
    private javax.swing.JCheckBox CheckBoxLogin;
    private javax.swing.JCheckBox CheckBoxPreguntaSecreta;
    private javax.swing.JCheckBox CheckBoxRespuestaSecreta;
    private javax.swing.JCheckBox CheckBoxTipoDeUsuario;
    private javax.swing.JCheckBox CheckBoxVinculoUV;
    private javax.swing.JCheckBox CheckBoxapellidos;
    private javax.swing.JCheckBox CheckBoxcorreoElectronico;
    private javax.swing.JCheckBox CheckBoxfechaDeNacimiento;
    private javax.swing.JCheckBox CheckBoxgenero;
    private javax.swing.JCheckBox CheckBoxnivelEscolaridad;
    private javax.swing.JCheckBox CheckBoxnombre;
    private javax.swing.JComboBox ComboBoxAnoNacimiento;
    private javax.swing.JComboBox ComboBoxDiaNacimiento;
    private javax.swing.JComboBox ComboBoxEscolaridad;
    private javax.swing.JComboBox ComboBoxPSecreta;
    private javax.swing.JComboBox ComoboBoxMesNacimiento;
    private javax.swing.ButtonGroup buttonGroup1;
    private javax.swing.ButtonGroup buttonGroup2;
    private javax.swing.JComboBox comboboxt_user;
    private javax.swing.JComboBox comoboboxVinculoUV;
    private javax.swing.JButton jButton1;
    private javax.swing.JComboBox jComboBoxGenero;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JPanel jPanel4;
    // End of variables declaration//GEN-END:variables

}
